import request from '@/utils/request'

// 获取 - 部门列表
export function getDepartment() {
  return request({
    url: '/company/department'

  })
}

// 获取-部门负责人列表
export function getSimple() {
  return request({
    url: '/sys/user/simple'

  })
}

// 新增-部门
export function postDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data

  })
}
// 获取-部门详情
export function getDepartments(id) {
  return request({ url: `/company/department/${id}` })
}
/** *
 * 更新部门
 * ***/
export function updateDepartment(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
/**
 * 删除部门
 *
*/

export function delDepartment(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
